#include <iostream>
#include <vector>
#include <queue>
#include "binartTree1.cpp" // 包含您现有的二叉树代码

int main() {
    char nums[11] = {1, 2, 3, 0, 4, 0, 5, 0, 0, 6, 0};
    BiTree tree = BiTree_Create(nums, 11, 0);

    std::cout << "请选择遍历方式：" << std::endl;
    std::cout << "1. 先序遍历" << std::endl;
    std::cout << "2. 中序遍历" << std::endl;
    std::cout << "3. 后序遍历" << std::endl;
    std::cout << "4. 层次遍历" << std::endl;

    int choice;
    std::cin >> choice;

    switch (choice) {
        case 1:
            std::cout << "先序遍历：";
            Order_Pre(tree);
            std::cout << std::endl;
            break;
        case 2:
            std::cout << "中序遍历：";
            Order_In(tree);
            std::cout << std::endl;
            break;
        case 3:
            std::cout << "后序遍历：";
            Order_Post(tree);
            std::cout << std::endl;
            break;
        case 4:
            std::cout << "层次遍历：";
            Order_Level(tree);
            std::cout << std::endl;
            break;
        default:
            std::cout << "无效的选择" << std::endl;
            break;
    }

    return 0;
}
